<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/inventoryinfo/warehouse/q_warehouse.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/inventoryinfo/warehouse/q_warehouse.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'WHSE_Id',
                footer: "Foots",
                cnName: '机构管理',
                name: 'warehouse/q_warehouse',
                url: "/q_warehouse/",
                sortName: "WHSE_no,CreateDate"
            });
            const editFormFields = ref({"WHSE_no":"","WHSE_name":"","WHSE_location":"","WHSE_size":"","Cat_pid":[],"Remark":""});
            const editFormOptions = ref([[{"title":"编码","required":true,"field":"WHSE_no","disabled":true,"colSize":4},
                               {"title":"名称","required":true,"field":"WHSE_name","colSize":8}],
                              [{"title":"位置","field":"WHSE_location","colSize":4},
                               {"title":"规格","field":"WHSE_size","colSize":4},
                               {"dataKey":"仓库","data":[],"title":"上级仓库","field":"Cat_pid","colSize":4,"type":"cascader"}],
                              [{"title":"备注","field":"Remark","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"WHSE_no":"","WHSE_name":"","Cat_pid":[]});
            const searchFormOptions = ref([[{"title":"编码","field":"WHSE_no","type":"like"},{"title":"名称","field":"WHSE_name","type":"like"},{"dataKey":"仓库","data":[],"title":"上级仓库","field":"Cat_pid","type":"cascader"}]]);
            const columns = ref([{field:'WHSE_Id',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'WHSE_no',title:'编码',type:'string',sort:true,width:120,readonly:true,require:true,align:'left',sort:true},
                       {field:'WHSE_name',title:'名称',type:'string',link:true,width:120,require:true,align:'left'},
                       {field:'WHSE_location',title:'位置',type:'string',width:120,align:'left'},
                       {field:'WHSE_size',title:'规格',type:'string',width:120,align:'left'},
                       {field:'Cat_pid',title:'上级仓库',type:'guid',bind:{ key:'仓库',data:[]},width:110,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifyer',title:'修改人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
